package com.sanweibook.jhook.biz.sys.impl;

import com.sanweibook.jhook.biz.CrudService;
import com.sanweibook.jhook.biz.sys.SysRoleService;
import com.sanweibook.jhook.dal.dao.sys.SysRoleDao;
import com.sanweibook.jhook.dal.model.sys.SysRole;
import com.sanweibook.jhook.dal.page.Page;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* Created by twg on 17/3/16.
*/
@Service
public class SysRoleServiceImpl extends CrudService<SysRoleDao,SysRole> implements SysRoleService {

    @Override
    public void delete(SysRole sysRole) {
        delete(sysRole,"sysRole:*");
    }

    @Override
    public void deleteById(Long id) {
        deleteById(id,"sysRole:*");
    }

    @Override
    public void deletedByIds(List<Long> ids) {
        deleteByIds(ids,"sysRole:*");
    }

    @Override
    public SysRole get(SysRole sysRole) {
        return get(sysRole,"sysRole:get");
    }

    @Override
    public SysRole getById(Long id) {
        return getById(id,"sysRole:getbyid");
    }

    @Override
    public void save(SysRole sysRole) {
        insert(sysRole,"sysRole:*");
    }

    @Override
    public void batchSave(List<SysRole> sysRole) {
        batchInsert(sysRole,"sysRole:*");
    }

    @Override
    public void update(SysRole sysRole) {
        update(sysRole,"sysRole:*");
    }

    @Override
    public int queryCount(SysRole sysRole) {
        return queryCount(sysRole,"sysRole:querycount");
    }

    @Override
    public List<SysRole> queryAll(SysRole sysRole) {
        return queryAll(sysRole,"sysRole:queryall");
    }

    @Override
    public List<SysRole> queryByIds(List<Long> ids) {
        return queryByIds(ids,"sysRole:querybyids");
    }

    @Override
    public Page<SysRole> queryByPages(SysRole sysRole) {
        return queryByPage(sysRole);
    }
}
